home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / xpcom / nsIInputStreamTee.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  130 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIInputStreamTee.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIInputStreamTee_h__
  6. #define __gen_nsIInputStreamTee_h__
  7.  
  8.  
  9. #ifndef __gen_nsIInputStream_h__
  10. #include "nsIInputStream.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIOutputStream; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIInputStreamTee */
  21. #define NS_IINPUTSTREAMTEE_IID_STR "44e8b2c8-1ecb-4a63-8b23-3e3500c34f32"
  22.  
  23. #define NS_IINPUTSTREAMTEE_IID \
  24.   {0x44e8b2c8, 0x1ecb, 0x4a63, \
  25.     { 0x8b, 0x23, 0x3e, 0x35, 0x00, 0xc3, 0x4f, 0x32 }}
  26.  
  27. /**
  28.  * A nsIInputStreamTee is a wrapper for an input stream, that when read
  29.  * reads the specified amount of data from its |source| and copies that
  30.  * data to its |sink|.  |sink| must be a blocking output stream.
  31.  */
  32. class NS_NO_VTABLE nsIInputStreamTee : public nsIInputStream {
  33.  public: 
  34.  
  35.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAMTEE_IID)
  36.  
  37.   /* attribute nsIInputStream source; */
  38.   NS_IMETHOD GetSource(nsIInputStream * *aSource) = 0;
  39.   NS_IMETHOD SetSource(nsIInputStream * aSource) = 0;
  40.  
  41.   /* attribute nsIOutputStream sink; */
  42.   NS_IMETHOD GetSink(nsIOutputStream * *aSink) = 0;
  43.   NS_IMETHOD SetSink(nsIOutputStream * aSink) = 0;
  44.  
  45. };
  46.  
  47. /* Use this macro when declaring classes that implement this interface. */
  48. #define NS_DECL_NSIINPUTSTREAMTEE \
  49.   NS_IMETHOD GetSource(nsIInputStream * *aSource); \
  50.   NS_IMETHOD SetSource(nsIInputStream * aSource); \
  51.   NS_IMETHOD GetSink(nsIOutputStream * *aSink); \
  52.   NS_IMETHOD SetSink(nsIOutputStream * aSink); 
  53.  
  54. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  55. #define NS_FORWARD_NSIINPUTSTREAMTEE(_to) \
  56.   NS_IMETHOD GetSource(nsIInputStream * *aSource) { return _to GetSource(aSource); } \
  57.   NS_IMETHOD SetSource(nsIInputStream * aSource) { return _to SetSource(aSource); } \
  58.   NS_IMETHOD GetSink(nsIOutputStream * *aSink) { return _to GetSink(aSink); } \
  59.   NS_IMETHOD SetSink(nsIOutputStream * aSink) { return _to SetSink(aSink); } 
  60.  
  61. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  62. #define NS_FORWARD_SAFE_NSIINPUTSTREAMTEE(_to) \
  63.   NS_IMETHOD GetSource(nsIInputStream * *aSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSource(aSource); } \
  64.   NS_IMETHOD SetSource(nsIInputStream * aSource) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSource(aSource); } \
  65.   NS_IMETHOD GetSink(nsIOutputStream * *aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSink(aSink); } \
  66.   NS_IMETHOD SetSink(nsIOutputStream * aSink) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSink(aSink); } 
  67.  
  68. #if 0
  69. /* Use the code below as a template for the implementation class for this interface. */
  70.  
  71. /* Header file */
  72. class nsInputStreamTee : public nsIInputStreamTee
  73. {
  74. public:
  75.   NS_DECL_ISUPPORTS
  76.   NS_DECL_NSIINPUTSTREAMTEE
  77.  
  78.   nsInputStreamTee();
  79.  
  80. private:
  81.   ~nsInputStreamTee();
  82.  
  83. protected:
  84.   /* additional members */
  85. };
  86.  
  87. /* Implementation file */
  88. NS_IMPL_ISUPPORTS1(nsInputStreamTee, nsIInputStreamTee)
  89.  
  90. nsInputStreamTee::nsInputStreamTee()
  91. {
  92.   /* member initializers and constructor code */
  93. }
  94.  
  95. nsInputStreamTee::~nsInputStreamTee()
  96. {
  97.   /* destructor code */
  98. }
  99.  
  100. /* attribute nsIInputStream source; */
  101. NS_IMETHODIMP nsInputStreamTee::GetSource(nsIInputStream * *aSource)
  102. {
  103.     return NS_ERROR_NOT_IMPLEMENTED;
  104. }
  105. NS_IMETHODIMP nsInputStreamTee::SetSource(nsIInputStream * aSource)
  106. {
  107.     return NS_ERROR_NOT_IMPLEMENTED;
  108. }
  109.  
  110. /* attribute nsIOutputStream sink; */
  111. NS_IMETHODIMP nsInputStreamTee::GetSink(nsIOutputStream * *aSink)
  112. {
  113.     return NS_ERROR_NOT_IMPLEMENTED;
  114. }
  115. NS_IMETHODIMP nsInputStreamTee::SetSink(nsIOutputStream * aSink)
  116. {
  117.     return NS_ERROR_NOT_IMPLEMENTED;
  118. }
  119.  
  120. /* End of implementation class template. */
  121. #endif
  122.  
  123. // factory method
  124. extern NS_COM nsresult
  125. NS_NewInputStreamTee(nsIInputStream **tee, // read from this input stream
  126.                      nsIInputStream *source,
  127.                      nsIOutputStream *sink);
  128.  
  129. #endif /* __gen_nsIInputStreamTee_h__ */
  130.